import request from '@/utils/request';
// import request from '@/utils/localRequest';
/**
 * 登录
 * @param
 */
export const loginERP = (data: any) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc',
    data,
    showLoad: true,
	isReturnRes:true,
  });
};
/**
 * 订单列表
 * @param
 */
export const getOrderList = (data: any, showLoad = true) => {
  // console.log(data,'霍邱列表');
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc',
    data,
    showLoad,
  });
};
/**
 * 物料
 * @param
 */
export const getAllocateMaterial = (data: any) => {
  return request({
    method: 'POST',
    url: 'Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.QueryGroupInfo.common.kdsvc',
    data,
    showLoad: true,
  });
};
/**
 * 订单详情
 * @param
 */
export const getOrderDetailByBillNo = (data: any, showLoad = true) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View.common.kdsvc',
    data,
    showLoad,
  });
};
/**
 * 订单保存
 * @param
 */
export const saveOrder = (data: any, showLoad = true) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc',
    data,
    showLoad,
  });
};
/**
 * 提交订单
 * @param
 */
export const submitOrder = (data: any) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit.common.kdsvc',
    data,
    showLoad: true,
  });
};
/**
 * 审核订单
 */
export const auditOrder = (data: any) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit.common.kdsvc',
    data,
    showLoad: true,
  });
};
/**
 * 反审核订单
 */
export const unAuditOrder = (data: any) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.UnAudit.common.kdsvc',
    data,
    showLoad: true,
  });
};
/**
 * 获取账套信息
 */
export const GetServerCommonConfig = () => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.ServiceFacade.ServicesStub.Account.AccountService.GetDataCenterList.common.kdsvc',
    showLoad: true,
	isReturnRes:true,
  });
};
/**
 *
 */
export const getCall = (data: any) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.QueryBusinessInfo.common.kdsvc',
    data,
    showLoad: true,
  });
};
/**
 * 附件上传，绑定单据
 * @param data
 * @returns
 */
export const uploadFile = (data: any) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.AttachmentUpLoad.common.kdsvc',
    data,
  });
};
/**
 * 下载附件
 * @param data
 * @returns
 */
export const downLoadFile = (data: any) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.AttachmentDownLoad.common.kdsvc',
    data,
    showLoad: true,
  });
};
/**
 * 附件上传，不绑定单据
 * @param data
 * @returns
 */
export const uploadFile01 = (data: any) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.UploadFile.common.kdsvc',
    data,
  });
};
/**
 * 切换组织
 * @param data
 * @returns
 * OrgNumber
 */
export const changeOrg = (data: any) => {
  return request({
    method: 'POST',
    url: '/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.SwitchOrg.common.kdsvc',
    data,
  });
};



